<template>
    <el-select
      v-model="value"
      :placeholder="placeholder || '请选择'"
      :multiple="multiple || false"
      :type="type"
      clearable
      @input="handleChange"
    >
      <el-option-group>
        <slot></slot>
      </el-option-group>
      <el-option-group v-if="type=='input'">
        <el-option
          v-for="item in options"
          :key="item.value"
          :label="item.label"
          :value="item.value"
        >
        </el-option>
      </el-option-group>
      <el-option-group v-if="type=='textarea'">
        <el-option>
          
        </el-option>
      </el-option-group>
    </el-select>
  </template>
  
  
  
  <script>
  export default {
    props: ["placeholder", "size", "options","multiple","type"],
    data() {
      return {
        value: "",
      };
    },
    mounted() {},
    watch: {},
    methods: {
      handleChange($event){
        console.log($event)
        this.$emit('input',$event)
      },
      clear(){
        this.value = ''
      }
    },
  };
  </script>